<template>
	<view class="sendlist">
		<view class="header">
			<uni-icons class="icon" type="back" size="50rpx" color="#fff" @click="backHandler"></uni-icons>

			<view>已投简历</view>
		</view>

		<view class="section">
			<view class="list">
				<view class="item" v-for="item in sendList" @click="toDetail(item._id)">
					<view class="message">
						<view class="titles">
							<view>{{ item?.title }}</view>
							<text>{{ item?.salary }}</text>
						</view>
						<view class="text">
							<view>{{ item?.workAddress }}</view>
							&nbsp;| &nbsp;
							<view>{{ item?.workRange }}</view>
							&nbsp;| &nbsp;
							<view>{{ item?.education }}</view>
						</view>
						<view class="bton">
							<view v-for="(item, index) in item?.welfare" :key="index">
								{{ item }}
							</view>
						</view>
						<view class="line"></view>
						<view class="bottom">

							<image :src="item?.companyInfo[0].logoUrl" mode=""></image>
							<view class="botm">
								<text>{{ item?.companyInfo[0].title }}</text>
								<view>
									{{ item?.companyInfo[0].companyType }}
									{{ item?.companyInfo[0].companyNumber }}
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				sendList: [],
			};
		},
		onLoad() {
			this.sendList = JSON.parse(localStorage.getItem("sendList")) || [];
		},
		methods: {
			backHandler() {
				uni.navigateBack()
			},
			toDetail(id) {
				uni.navigateTo({
					url: '/pages/detail/detail?id=' + id
				});
			
			},
		}
	}
</script>

<style lang="scss">
	.sendlist {
		.header {
			position: fixed;
			top: 0;
			right: 0;
			left: 0;
			background-color: #5fae53;
			width: 100%;
			display: flex;
			height: 100rpx;
			justify-content: center;
			align-items: center;
			color: #fff;
			font-size: 36rpx;
			// font-weight: bold;

			.icon {
				position: absolute;
				left: 30rpx;
				top: 50%;
				margin-top: -24rpx;
			}
		}

		.section {
			margin-top: 150rpx;

			.list {
				.item {
					display: flex;
					flex-wrap: wrap;
					justify-content: center;
					margin-bottom: 30rpx;

					.message {
						width: 690rpx;
						height: 314rpx;
						background: #ffffff;
						box-shadow: 0rpx 6rpx 22rpx 0rpx rgba(1, 64, 153, 0.22);
						border-radius: 20rpx;
						padding: 10rpx 20rpx;
						box-sizing: border-box;

						.titles {
							display: flex;
							justify-content: space-between;
							align-items: center;
							font-size: 36rpx;
							font-family: SourceHanSansCN;
							font-weight: 400;
							color: #333333;
							line-height: 70rpx;

							text {
								color: #5fae53;
							}
						}

						.text {
							display: flex;
							text-align: start;
							align-items: center;
							color: #999;
							margin-bottom: 10rpx;

							view {
								font-size: 24rpx;
							}
						}

						.bton {
							display: flex;
							flex-wrap: wrap;

							view {
								padding: 2rpx 6rpx;
								background-color: #f4f4f4;
								margin-right: 10rpx;
								border-radius: 10rpx;
								font-size: 24rpx;
							}
						}

						.line {
							width: 100%;
							border-top: 2rpx solid #f3f3f3;
							margin: 30rpx 0 20rpx 0;
						}

						.bottom {
							display: flex;
							align-items: center;
							justify-content: start;

							image {
								width: 60rpx;
								height: 60rpx;
								border-radius: 50%;
								margin-right: 20rpx;
							}

							.botm {
								text-align: start;

								text {
									font-size: 28rpx;
									font-family: SourceHanSansCN;
									font-weight: 400;
									color: #333333;
								}

								view {
									color: #999;
									font-size: 24rpx;
								}
							}
						}
					}
				}
			}
		}
	}
</style>
